import axios from "axios";


export const request = axios.create({
    baseURL: '/A2F',
    timeout: 60000,
    headers: {
        contentType: "application/json",
    }
});


const SetTrack = function(params) {
    return new Promise((resolve, reject) => {
      request.post("/Player/SetTrack", params)
        .then(function(response) {
          resolve(response.data);
        })
        .catch(function(error) {
          console.log(error);
          reject(error);
        });
    });
  }

const Play = function() {
return new Promise((resolve, reject) => {
    request.post("/Player/Play", params)
    .then(function(response) {
        resolve(response.data);
    })
    .catch(function(error) {
        console.log(error);
        reject(error);
    });
});
}




export{ 
    SetTrack , Play
};